import {
	getShopData
} from "../../api/business";
export default {
	namespaced: true,
	state: {
		shops: []
	},
	mutations: {
		//设置商铺列表
		["SET_SHOPS"](state, payload) {
			console.log(payload.shops)
			state.shops = payload.shops;
		}
	},
	actions: {
		//显示首页商家列表
		getShop(conText, payload) {
			getShopData(payload).then(res => {
				console.log(res)
				if (res.code == 200) {
					conText.commit("SET_SHOPS", {
						shops: res.data
					});
				}
			})
		}
	}
}